<%--
  Created by IntelliJ IDEA.
  User: tugou
  Date: 2017/4/27
  Time: 0:25
  To change this template use File | Settings | File Templates.
--%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="sf" uri="http://www.springframework.org/tags/form" %>
<html>
<head>
    <title>报名完成</title>
    <link rel="stylesheet" type="text/css" href="<%=basePath%>css/wapstyle.css">
    <meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0,user-scalable=no"
          name="viewport" id="viewport">
    <script src="<%=basePath%>js/jquery.min.js"></script>
    <script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
    <script>
        var wxConfig = false;
        var obj = new Object();
        obj.url = window.location.href;
        function wxJsSdkInit() {
            $.post("<%=basePath%>wechat/sdkInit", obj, function (data) {
                wx.config({
                    appId: data.appid,
                    timestamp: data.timestamp,
                    nonceStr: data.nonceStr,
                    signature: data.signature,
                    jsApiList: ['openLocation']
                });
                wx.ready(function () {
                    wxConfig = true;
                });
            });
        }
        /**
         * 预约学车
         */
        wxJsSdkInit();
        /*
         * 导航
         * */
        function navigation() {
            wx.openLocation({
                latitude: ${loc.locationX}, // 纬度，浮点数，范围为90 ~ -90
                longitude: ${loc.locationY}, // 经度，浮点数，范围为180 ~ -180。
                name: '${loc.areaname}', // 位置名
                address: '${loc.locationname}', // 地址详情说明
                scale: 26, // 地图缩放级别,整形值,范围从1~28。默认为最大
                infoUrl: '' // 在查看位置界面底部显示的超链接,可点击跳转
            });
        }
    </script>
</head>
<body>
<div style="position: relative">
    <h2 class="header">预约成功 </h2>
    <a style="position: absolute;right: 0;top: 12px;width: 80px;color: white;padding: 5px;font-size: 17px"
       href="tel:66655980"><img
            style="width: 21px; height: 20px; display: inline-block;margin-right: 5px;margin-top: -1px;"
            src="<%=basePath%>images/servicePhone.png"/>客服</a>
</div>
<div class="yucheng">
    <h2><i><img src="<%=basePath%>images/gunzg.png"></i>预约学车成功</h2>
    <p>您的预约我们已经收到，正在安排相关人员与您联系，确定学车时间，请注意保持您的手机畅通，谢谢。</p>
    <a href="#" class="mianfei" onclick="navigation()"> <img src="<%=basePath%>images/icon_map.png" a
                                                             href="javascript:void(0)"
                                                             class="ulpic">导航到学车点</a>
    <c:if test="${loc.dsphone!=null}">
        <a href="tel:${loc.dsphone}" class="mianfei" style="margin-top: 10px;"> <img src="<%=basePath%>images/phone.png"
                                                                                  class="ulpic">联系电话:${loc.dsphone}</a>
    </c:if>

</div>
</body>
</html>
